/**
 * Created by vince on 15/4/23.
 */
'use strict';

angular.module('myApp.repeat',['ngRoute'])

    .config(['$routeProvider', function($routeProvider) {
        $routeProvider.when('/viewloop',{
            templateUrl:'repeat/viewloop.html',
            controller:'PhoneListCtrl'
        });
    }])
    .controller('PhoneListCtrl',['$scope', '$http',function($scope,$http){
        $http.get('repeat/phones.json').success(function(data){
            $scope.phones=data;
        });
        $scope.orderProp='age';
        /*
        $scope.phones=[
            {"name": "Nexus S",
                "snippet": "Fast just got faster with Nexus S."},
            {"name": "Motorola XOOM™ with Wi-Fi",
                "snippet": "The Next, Next Generation tablet."},
            {"name": "MOTOROLA XOOM™",
                "snippet": "The Next, Next Generation tablet."}
        ];
        */
    }]);
